package com.bluestarenergy.provisioning.engine.dao.impl;

import java.util.List;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import com.bluestarenergy.provisioning.engine.dao.BudgetBillingDAO;
import com.bluestarenergy.provisioning.engine.domain.AccountProductBudgetBilling;
import com.bluestarenergy.provisioning.engine.domain.CustomerCredit;

@Repository
public class BudgetBillingDAOImpl extends BaseDAOHibernate implements BudgetBillingDAO{

	@Autowired
	public BudgetBillingDAOImpl(SessionFactory sessionFactory) {
		setSessionFactory(sessionFactory);
	}

	public List<AccountProductBudgetBilling> findAccountProductBudgetBillingAll(){
		String quey = "from AccountProductBudgetBilling";
		return find(AccountProductBudgetBilling.class, quey);
	}
	
	public List<CustomerCredit> readCustomer(){
		String quey = "from CustomerCredit ";
		return find(CustomerCredit.class, quey);
	}
	
	public void writeCustomer(CustomerCredit customerCredit){
		super.save(customerCredit);
	}

}
